package com.gztms.exception;

import com.gztms.enums.AppCodeEnum;

/**
 * @author Zoey
 * @date 2023/5/2 0:37
 * @Description TODO
 **/
public class SystemException extends RuntimeException{
    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public SystemException(AppCodeEnum codeEnum) {
        super(codeEnum.getMsg());
        this.code = codeEnum.getCode();
        this.msg = codeEnum.getMsg();
    }
}
